package com.bdqn.hospital.service.impl;

import com.bdqn.hospital.mapper.SysUsersMapper;
import com.bdqn.hospital.pojo.SysUsers;
import com.bdqn.hospital.service.SysUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version : 1.0
 * @Author :guogd
 * @createTime: 2023/03/01 15:07
 * @Description: com.bdqn.hospital.service.impl
 */
@Service
public class SysUsersServiceImpl implements SysUsersService {

    @Autowired
    private SysUsersMapper sysUsersMapper;

    @Override
    public SysUsers logIn(String account, String password) {
        return sysUsersMapper.logIn(account, password);
    }

    @Override
    public SysUsers getById(Integer id) {
        return sysUsersMapper.getByUserId(id);
    }

    @Override
    public List<SysUsers> getUserName() {
        return sysUsersMapper.getUserName();
    }

    @Override
    public List<SysUsers> getAll() {
        return sysUsersMapper.getAll();
    }

    @Override
    public Integer addUsers(SysUsers users) {
        return sysUsersMapper.addUser(users);
    }

}
